import {axios} from '@/utils/request'

/**
 * 现场咨询
 *
 * @author chen
 */
//接待列表
export function SceneConsultationList(parameter) {
  return axios({
    url: '/consult/list',
    // url: '/consult/index_list',
    method: 'get',
    params: parameter
  })
}

//树形项目列表
export function itemTreeList() {
  return axios({
    url: '/consult/itemTree',
    method: 'get',
  })
}

//树形产品列表
export function productList() {
  return axios({
    url: '/consult/productTree',
    method: 'get',
  })
}

//树形活动列表
export function activityList() {
  return axios({
    url: '/activity/getActivity',
    method: 'get',
  })
}

//树形套餐列表
export function packageList() {
  return axios({
    url: '/package/getPackage',
    method: 'get',
  })
}

//接诊
export function sceneSave(params) {
  return axios({
    url: '/consult/consultationRecord/save',
    method: 'post',
    data: params
  })
}

//编辑
export function sceneUpdate(params) {
  return axios({
    url: '/consult/consultationRecord/Update',
    method: 'post',
    data: params
  })
}


//主诉、历史诉求、增值金等数据
export function getItemAndPrice(params) {
  return axios({
    url: '/consult/intention',
    method: 'get',
    params: params
  })
}

//获取项目报价
export function getQuotePrice(params) {
  return axios({
    url: '/consult/consultationItem/echo',
    method: 'get',
    params: params
  })
}



//项目树
export function getItemClasssify() {
  return axios({
    url: 'item/itemType/treeList',
    method: 'get'
  })
}

//产品树
export function getProductTree() {
  return axios({
    url: '/product/productType/treeList',
    method: 'get'
  })
}

//活动树
export function getActivityTree(params) {
  return axios({
    url: '/activity/getConsultActivityList',
    method: 'get',
    params:params
  })
}

//套餐树
export function getPackageTree(params) {
  return axios({
    url: '/package/getConsultPackageList',
    method: 'get',
    params:params
  })
}

export function getItemDetailById(params) {
  return axios({
    url: `/item/getItemList`,
    method: 'get',
    params: params
  })
}

export function drawBill(params) {
  return axios({
    url: `/consult/consultationItem/save`,
    method: 'post',
    data: params
  })
}


export function addItemType(params) {
  return axios({
    url: `/item/itemType/add`,
    method: 'post',
    data:params
    //params
  })
}

//科室列表
export function getDeptList () {
  return axios({
    url: `/common/dept/list`,
    method: 'get'
  })
}


//费用列表
export function getAmtTypeList () {
  return axios({
    url: `/common/amtType`,
    method: 'get'
  })
}

//获取账单详情
export function getBill (params) {
  return axios({
    url: `/consult/consultationItem/bill`,
    method: 'get',
    params
  })
}

//开单
export function submitBill (params) {
  return axios({
    url: `/consult/consultationItem/bill`,
    method: 'post',
    data:params
  })
}



//项目选择
export function getItemListById (params) {
  return axios({
    url: `/item/getConsultItemByItemId`,
    method: 'get',
    params: params
  })
}

//产品选择
export function getProductListById (params) {
  return axios({
    url: `/product/getConsultItemByProductId`,
    method: 'get',
    params: params
  })
}

//套餐选择
export function getPackageListById (params) {
  return axios({
    url: `/package/getConsultItemByPackageId`,
    method: 'get',
    params: params
  })
}

//活动选择
export function getActivityListById (params) {
  return axios({
    url: `/activity/getConsultItemByActivityId`,
    method: 'get',
    params: params
  })
}

//项目列表
export function getConsultItemList(params) {
  return axios({
    url: `/item/getConsultItemList`,
    method: 'get',
    params: params
  })
}

//产品列表
export function getConsultProductList(params) {
  return axios({
    url: `/product/getConsultProductList`,
    method: 'get',
    params: params
  })
}

//活动列表
export function getConsultActivityList(params) {
  return axios({
    url: `/activity/getConsultActivityList`,
    method: 'get',
    params: params
  })
}

//套餐列表
export function getConsultPackageList(params) {
  return axios({
    url: `/package/getConsultPackageList`,
    method: 'get',
    params: params
  })
}

//套餐列表
export function getConsultItemDetails(params) {
  return axios({
    url: `/consult/getConsultItemList`,
    method: 'get',
    params: params
  })
}









